<?php
/*
 * OrangeHRM is a comprehensive Human Resource Management (HRM) System that captures
 * all the essential functionalities required for any enterprise.
 * Copyright (C) 2006 OrangeHRM Inc., http://www.orangehrm.com
 *
 * OrangeHRM is free software; you can redistribute it and/or modify it under the terms of
 * the GNU General Public License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * OrangeHRM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along with this program;
 * if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA  02110-1301, USA
 */
$styleSheet = "orange";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<script type="text/javascript" src="../../scripts/archive.js"></script>
<script type="text/javascript" src="../../scripts/time.js"></script>

<link href="../../themes/<?php echo $styleSheet;?>/css/leave.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../../themes/<?php echo $styleSheet;?>/scripts/style.js"></script>
<link href="../../themes/<?php echo $styleSheet;?>/css/style.css" rel="stylesheet" type="text/css"/>
<!--[if lte IE 6]>
<link href="../../themes/<?php echo $styleSheet; ?>/css/IE6_style.css" rel="stylesheet" type="text/css"/>
<![endif]-->
<!--[if IE]>
<link href="../../themes/<?php echo $styleSheet; ?>/css/IE_style.css" rel="stylesheet" type="text/css"/>
<![endif]-->
<style>
.actionbar ul{margin:0;padding:30px 0px;}
.actionbar ul li{float:left; list-style:none;}
.actionbar ul li a{display:block;padding:5px; background-color:#666633;color:#FFF; text-decoration:none;font-size:13px; font-family:Verdana, Geneva, sans-serif;}
.actionbar ul li a:hover{background-color:#cccc99;}
</style>
</head>
<body class="yui-skin-sam">

<div class="outerbox">
    <div class="outerbox"><div class="top"><div class="left"></div><div class="right"></div><div class="middle"></div></div><div class="maincontent">
        <div class="mainHeading"><h2>自助服务</h2></div>

        
        
      
        
        
    
   <div class="actionbar">
   <div style="width:800px;padding:10px;font-size:14px;line-height:22px;">
   <?php
	if(is_array($records['Permissions'])){
		  $Permissions = $records['Permissions']['permiss'];
		  $word = "你好！欢迎登陆oa自助服务! ";
		  if($Permissions > 0){
		  		echo $word."你有权限进行审批,马上前往&nbsp;<a href=\"CentralController.php?oacode=oamange&action=todo\" style=\"font-size:14px;color:red;\">审批</a>";
		  
		  }else{
				echo $word;
		  }
	}
   ?>
   <br/>
   你的年假剩余小时数：<font color=red><?php echo $records['ResidualHours']['jiaqi'];?></font>小时,还有年假<font color=red><?php echo $records['ResidualHours']['FreezeHour'];?></font>小时在审批中；有效期：
		<?php echo $records['ResidualHours']['EffectDate']."~".$records['ResidualHours']['EndDate'];?>
   </div>
       	<ul>
			<?php 
            if(is_array($records['Permissions'])){
                $Permissions = $records['Permissions']['permiss'];
                if($Permissions > 0){
                    echo "<li><a href=\"CentralController.php?oacode=oamange&action=todo\" style=\"color:#FF0000;\">我的审批</a></li>";
                }
            }
            ?>
        	<li><a href="CentralController.php?adcode=report&action=My&s=AddSpecialAttend">特殊考勤申请</a></li>
            <li><a href="CentralController.php?adcode=report&action=My&s=searchAttend">考勤查询</a></li>
            <li><a href="CentralController.php?adcode=report&action=My&s=special">特殊考勤查询</a></li>
            
        
         <?php
            $reslut = $records['list'];
            if(is_array($reslut) && count($reslut)>0){
                foreach($reslut as $key => $val){
					
                    echo '<li><a href="CentralController.php?adcode=report&action=My&s=defApproval&TypeId='.$val['mid'].'" title="typename">'.$val['typename'].'</a></li>';
                }
            }
            ?>
        </ul>
        
         <h3 style='text-align:center;'><?php echo @date('Y年n月',time());?>排班表</h3>
    <table cellspacing="0" cellpadding="0" class="data-table"  border="1">
					<thead>
					<tr>
						<td scope="col" align="center" width="50px;">姓名</td>
						<td scope="col" width="30px;">班次</td>
						<td scope='col' style='text-align:center;'>1</td>
						<td scope='col' style='text-align:center;'>2</td>
						<td scope='col' style='text-align:center;'>3</td>
						<td scope='col' style='text-align:center;'>4</td>
						<td scope='col' style='text-align:center;'>5</td>
						<td scope='col' style='text-align:center;'>6</td>
						<td scope='col' style='text-align:center;'>7</td>
						<td scope='col' style='text-align:center;'>8</td>
						<td scope='col' style='text-align:center;'>9</td>
						<td scope='col' style='text-align:center;'>10</td>
						<td scope='col' style='text-align:center;'>11</td>
						<td scope='col' style='text-align:center;'>12</td>
						<td scope='col' style='text-align:center;'>13</td>
						<td scope='col' style='text-align:center;'>14</td>
						<td scope='col' style='text-align:center;'>15</td>
						<td scope='col' style='text-align:center;'>16</td>
						<td scope='col' style='text-align:center;'>17</td>
						<td scope='col' style='text-align:center;'>18</td>
						<td scope='col' style='text-align:center;'>19</td>
						<td scope='col' style='text-align:center;'>20</td>
						<td scope='col' style='text-align:center;'>21</td>
						<td scope='col' style='text-align:center;'>22</td>
						<td scope='col' style='text-align:center;'>23</td>
						<td scope='col' style='text-align:center;'>24</td>
						<td scope='col' style='text-align:center;'>25</td>
						<td scope='col' style='text-align:center;'>26</td>
						<td scope='col' style='text-align:center;'>27</td>
						<td scope='col' style='text-align:center;'>28</td>
						<td scope='col' style='text-align:center;'>29</td>
						<td scope='col' style='text-align:center;'>30</td>
						<td scope='col' style='text-align:center;'>31</td>					
						</tr>
					</thead>

					<tbody>

	
    <?php 
    
    if(is_array($records['argclass']) && count($records['argclass']) > 0){
		$argclass = array();
    	$argclass =unserialize($records['argclass']['m_class']);
    	if(is_array($argclass)){
	    	echo "<tr>";
	    	echo "<td scope=\"col\" align=\"center\" width=\"30px;\">".$records['argclass']['member_name']."</td>";
	    	echo "<td scope=\"col\" width=\"30px;\">".$records['argclass']['m_group']."</td>";
	    	
	    	foreach($argclass as $key=>$v){
	
					if($key == @date('d',time()) ){
	    				echo "<td scope='col' style='text-align:center;background-color:#CCFF66;color:red;'>".$v."</td>";
	    			}else{
	    				echo "<td scope='col' style='text-align:center;'>".$v."</td>";
	    			}
	    	}
	    echo "</tr>";
    	}
    	
    }else{
    	echo "<tr><td colspan=\"33\" style='text-align:center;font-size:14px;'>本月排班还没出来！</td></tr>";
    }
    ?>
    	</tbody>
	</table>
    <br class="clear">
    </div>
    <br class="clear">
    
  </div><div class="bottom"><div class="left"></div><div class="right"></div><div class="middle"></div></div></div>
</div>



</body>
</html>
